<?php
$error_sql = "Lỗi kết nối";
$css_script = array('<link type="icon/x-icon" href="images/logo_icon.ico" rel="shortcut icon" />',
'<link href="style.css" rel="stylesheet" type="text/css" />',
'<link href="assets/wt-rotator.css" rel="stylesheet" type="text/css" />'
);
define(does_not_exist,'Mục này không tồn tại.');

define(url_hinh_menu,'upload/images/danhmuc/');
define(url_hinh_menu_thumbs,'upload/_thumbs/Images/danhmuc/');
define(url_hinh_info,'upload/images/info/');
define(url_hinh_info_thumbs,'upload/_thumbs/Images/info/');
define(url_hinh_product,'upload/images/products/');
define(url_hinh_product_thumbs,'upload/_thumbs/Images/products/');
define(url_hinh_picture,'upload/images/thuvienanh/');
define(url_hinh_picture_thumbs,'upload/_thumbs/Images/thuvienanh/');
define(url_hinh_tailieu,'upload/files/');
define(url_hinh_video,'upload/images/video/');
define(url_hinh_video_thumbs,'upload/_thumbs/Images/video/');

include_once('class/class.trangchu.php');
$tc = new trangchu();

if(!@$_GET['lang']) {
	if(!@$_SESSION['lang1']) {
		$_SESSION['lang1'] = 'vi';
	}
} else {
	$_SESSION['lang1'] = $_GET['lang'];
	header("location: index.html");
}
$lang = $_SESSION['lang1'];
include_once("lang/{$lang}.php");

$config = $tc->config($lang) or die ($error_sql);
$row_config = mysql_fetch_array($config);
mysql_free_result($config);

$domain = $row_config['domain'];
$lang = $row_config['lang'];
define(max_news,$row_config['max_news']);
define(max_product,$row_config['max_product']);
define(max_picture,$row_config['max_picture']);
define(max_video,$row_config['max_video']);